/// 推荐奖励明细
class RewardDetailEntity {
  /// 主键id
  final int? id;
  /// 被推荐人用户ID
  final int? userId;
  /// 被推荐人的用户名
  final String? userName;
  /// 被推荐人的核销订单号
  final String? orderNum;
  /// 推荐人用户ID
  final int? referrerId;
  /// 推荐人的用户名
  final String? referrerName;
  /// 奖励比例
  final String? proportion;
  /// 推荐人获得的奖励，奈拉
  final int? rewardAmount;
  /// 奖励时间
  final String? createTime;

  RewardDetailEntity({
    this.id,
    this.userId,
    this.userName,
    this.orderNum,
    this.referrerId,
    this.referrerName,
    this.proportion,
    this.rewardAmount,
    this.createTime,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (id != null) data['id'] = id;
    if (userId != null) data['userId'] = userId;
    if (userName != null) data['userName'] = userName;
    if (orderNum != null) data['orderNum'] = orderNum;
    if (referrerId != null) data['referrerId'] = referrerId;
    if (referrerName != null) data['referrerName'] = referrerName;
    if (proportion != null) data['proportion'] = proportion;
    if (rewardAmount != null) data['rewardAmount'] = rewardAmount;
    if (createTime != null) data['createTime'] = createTime;
    return data;
  }

  factory RewardDetailEntity.fromJson(Map<String, dynamic> json) {
    return RewardDetailEntity(
      id: json['id'],
      userId: json['userId'],
      userName: json['userName'],
      orderNum: json['orderNum'],
      referrerId: json['referrerId'],
      referrerName: json['referrerName'],
      proportion: json['proportion'],
      rewardAmount: json['rewardAmount'],
      createTime: json['createTime'],
    );
  }
}